package com.enjoyor.soa.traffic.frame.support.kafka.callback;

import org.springframework.util.concurrent.FailureCallback;

import com.enjoyor.soa.traffic.frame.support.kafka.message.KafkaMessage;

public class CallbackFailure implements FailureCallback {

    private String topic;

    private KafkaMessage data;

    @Override
    public void onFailure(Throwable ex) {
        System.out.println("失败 topid:" + topic + ",data:" + data);
    }

    public CallbackFailure(String topic, KafkaMessage data) {
        this.topic = topic;
        this.data = data;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public KafkaMessage getData() {
        return data;
    }

    public void setData(KafkaMessage data) {
        this.data = data;
    }

}
